<template>
	<self-window left="160px" />
	<view class="self-box">
		<self-left />
		<component :is="menu.component" class="flex-1"></component>
	</view>
</template>

<script setup>
	import { onMounted, toRefs, ref } from 'vue';
	import { menuStore } from '@/store/menu';
	const menu = menuStore()
	import { checkUpdate } from '@/utils/commen.js'
	
	onMounted(async () => {
		if (!uni.getStorageSync('uni_id_token')) {
			uni.reLaunch({
				url: '/uni_modules/uni-id-pages/pages/login/login-withpwd'
			})
		}
		
		checkUpdate() // 检查更新
	})
</script>

<style scoped lang="scss">
	.self-box {
		display: flex;

		.flex-1 {
			flex: 1;
		}
	}
</style>